/**
 * The pulley joint is connected to two bodies and two fixed ground points.
 * The pulley supports a ratio such that:
 * length1 + ratio * length2 <= constant
 * Yes, the force transmitted is scaled by the ratio.
 * Warning: the pulley joint can get a bit squirrelly by itself. They often
 * work better when combined with prismatic joints. You should also cover the
 * the anchor points with static shapes to prevent one side from going to
 * zero length.
**/
public class b2PrismaticJoint extends b2Joint {
	public b2PrismaticJoint(int addr) {
		super(addr);
	}

	@Override
	public void release() {
		if ( address != 0 ) {
			super.release();
		}
	}

	public b2Vec2 GetAnchorA() {
		return new b2Vec2(jni_GetAnchorA(address));
	}

	public b2Vec2 GetAnchorB() {
		return new b2Vec2(jni_GetAnchorB(address));
	}

	public b2Vec2 GetReactionForce(float inv_dt) {
		return new b2Vec2(jni_GetReactionForce(address, inv_dt);
	}

	public float GetReactionTorque(float inv_dt) {
		return jni_GetReactionTorque(address, inv_dt);
	}

	/// Get the first ground anchor.
	public b2Vec2 GetGroundAnchorA() {
		return new b2Vec2(jni_GetGroundAnchorA(address));
	}

	/// Get the second ground anchor.
	public b2Vec2 GetGroundAnchorB() {
		return new b2Vec2(jni_GetGroundAnchorB(address));
	}

	/// Get the current length of the segment attached to bodyA.
	public float GetLengthA() {
		return jni_GetLengthA(address);
	}

	/// Get the current length of the segment attached to bodyB.
	public float GetLengthB() {
		return jni_GetLengthB(address);
	}

	/// Get the pulley ratio.
	public float GetRatio() {
		return jni_GetRatio(address);
	}

	/// Dump joint to dmLog
	public void Dump() {
		throw new UnsupportedOpeartionException();
	}
}
